CREATE TABLE [dbo].[wad_operadores]
(
[cd_operador] [dbo].[_nombre] NOT NULL CONSTRAINT [DF_wad_operadores_cd_operador] DEFAULT ((1)),
[nm_operador] [dbo].[_nombre] NOT NULL,
[nu_interno_telefono] [dbo].[_entero] NULL,
[st_bloqueado] [dbo].[_logico] NOT NULL,
[cd_barra_herr] [dbo].[_codigo] NULL,
[st_tracking] [dbo].[_logico] NOT NULL,
[st_cambiar_clave] [dbo].[_logico] NOT NULL,
[va_clave_acceso] [dbo].[_descripcion] NULL,
[fe_alta] [datetime] NULL,
[de_notas] [dbo].[_descripcion] NULL,
[cd_tema] [varchar] (50) COLLATE Modern_Spanish_CI_AS NULL,
[id_entidad] [dbo].[_codigo] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[wad_operadores] ADD CONSTRAINT [PK_wad_operadores] PRIMARY KEY CLUSTERED  ([cd_operador]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [FK_cd_barra_herr] ON [dbo].[wad_operadores] ([cd_barra_herr]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[wad_operadores] ADD CONSTRAINT [FK_wad_operadores_wcd_barra_herramientas] FOREIGN KEY ([cd_barra_herr]) REFERENCES [dbo].[wcd_barra_herramientas] ([cd_barra_herr]) ON UPDATE CASCADE
GO
ALTER TABLE [dbo].[wad_operadores] ADD CONSTRAINT [FK_wad_operadores_App_entidad] FOREIGN KEY ([id_entidad]) REFERENCES [dbo].[App_entidad] ([id_entidad])
GO
EXEC sp_bindefault N'[dbo].[cero]', N'[dbo].[wad_operadores].[nu_interno_telefono]'
GO
EXEC sp_bindefault N'[dbo].[cero]', N'[dbo].[wad_operadores].[st_bloqueado]'
GO
EXEC sp_bindefault N'[dbo].[cero]', N'[dbo].[wad_operadores].[st_tracking]'
GO
EXEC sp_bindefault N'[dbo].[cero]', N'[dbo].[wad_operadores].[st_cambiar_clave]'
GO
